package com.example.train.service.impl;

import com.example.train.service.SysRolePermissionRelationService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.example.train.model.SysRolePermissionRelation;
import com.example.train.mapper.SysRolePermissionRelationMapper;

import java.util.List;

@Service
public class SysRolePermissionRelationServiceImpl implements SysRolePermissionRelationService {

    @Resource
    private SysRolePermissionRelationMapper sysRolePermissionRelationMapper;

    @Override
    public int deleteByPermissionId(long id) {
        return sysRolePermissionRelationMapper.deleteByPermissionId(id);
    }

    @Override
    public int deleteByRoleId(long id) {
        return sysRolePermissionRelationMapper.deleteByRoleId(id);
    }

    @Override
    public int deleteById(long id) {
        return sysRolePermissionRelationMapper.deleteById(id);
    }

    @Override
    public List<SysRolePermissionRelation> selectByPermissionId(long id) {
        return sysRolePermissionRelationMapper.selectByPermissionId(id);
    }

    @Override
    public int insert(List<SysRolePermissionRelation> record) {
        return sysRolePermissionRelationMapper.insert(record);
    }

}
